<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改电影放映时间')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-movieshowtime-edit" th:object="${ticketMovieShowTime}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">放映厅编号：</label>
                <div class="col-sm-8">
                    <input name="showNumber" th:field="*{showNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">放映厅名字：</label>
                <div class="col-sm-8">
                    <input name="showName" th:field="*{showName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">总票量：</label>
                <div class="col-sm-8">
                    <input name="ticketCount" th:field="*{ticketCount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">已出售票数：</label>
                <div class="col-sm-8">
                    <input name="soldCount" th:field="*{soldCount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">剩余票数：</label>
                <div class="col-sm-8">
                    <input name="leftCount" th:field="*{leftCount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">放映日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="playDate" th:value="${#dates.format(ticketMovieShowTime.playDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">放映时间：</label>
                <div class="col-sm-8">
<!--                    <div class="input-group date">-->
<!--                        <input name="playTime" th:value="${#dates.format(ticketMovieShowTime.playTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!--                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!--                    </div>-->
                    <input type="time"   name="playTime"  th:value="*{playTime}" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电影ID：</label>
                <div class="col-sm-8">
                    <input name="movieId" th:field="*{movieId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电影名称：</label>
                <div class="col-sm-8">
                    <input name="movieName" th:field="*{movieName}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/movieshowtime";
        $("#form-movieshowtime-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-movieshowtime-edit').serialize());
            }
        }

        $("input[name='playDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='playTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>